package cn.yitun.chat.yitunservercommonlib.converter.ot;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupChatContentDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupChatLogDto;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface GroupChatDtoToLogConverter {

    GroupChatDtoToLogConverter INSTANCE = Mappers.getMapper(GroupChatDtoToLogConverter.class);
//    @Mappings({
//            @Mapping(source = "parentId" ,target = "parentId" ),
//            @Mapping(source = "parentUrl" ,target = "parentUrl" ),
//            @Mapping(source = "parentName" ,target = "parentName" ),
//    })
    GroupChatContentDto vo2treevo(GroupChatLogDto dto);

    List<GroupChatContentDto> vo2treevo(List<GroupChatLogDto> dtoList);

    @InheritInverseConfiguration
    GroupChatLogDto treevo2vo(GroupChatContentDto dto);
    @InheritInverseConfiguration
    List<GroupChatLogDto> treevo2vo(List<GroupChatContentDto> dtoList);
}
